package test;


import templatepattern.AbstractSetting;
import templatepattern.LocalSetting;
import templatepattern.RedisSetting;

public class TemplateMain {

	public static void main(String[] args) {
		// 使用本地缓存模版
		AbstractSetting localSetting = new LocalSetting();
		System.out.println("test = " + localSetting.getSetting("test"));
		System.out.println("test = " + localSetting.getSetting("test"));
		// 使用redis缓存模版
		AbstractSetting redisSetting = new RedisSetting();
		System.out.println("autosave = " + redisSetting.getSetting("autosave"));
		System.out.println("autosave = " + redisSetting.getSetting("autosave"));
	}
}
